#ifndef BOND_HEADER_VIZMF_PROJECT
#define BOND_HEADER_VIZMF_PROJECT

/*
  VizMF Bond class

  Atom_handler might be a pointer (iterator) to Atom, reference to Atom, Atom itself
  or just plain old index.
*/

template <typename Atom_handler>
class Bond {
public:
  typedef Atom_handler atom_handler;
  typedef unsigned int int_type;

  Bond(int_type num = 0, atom_handler from = atom_handler(), atom_handler to = atom_handler(), int_type order = 0)
    : number_(num), from_(from), to_(to), order_(order) {}

  //!! get / set members for all data should follow below...
  void setNumber(const int_type number) { number_ = number; }
  int_type number() const { return number_;}

  void setFrom(const atom_handler& atom ) { from_ = atom;}
  const atom_handler& from() const { return from_; }

  void setTo(const atom_handler& atom) { to_ = atom; }
  const atom_handler& to() const { return to_; }

  void setOrder(int_type order) const { order_ = order; }
  int_type order() const { return order_; }

  // convenience member function to check if bond connects atom
  bool connects( const atom_handler atom) { return from_ == atom || to_ == atom; }
private:
  int_type number_;
  atom_handler from_, to_;
  int_type order_;
};

#endif // BOND_HEADER_VIZMF_PROJECT
